<?php
header('Content-type: text/html; charset=utf-8');
include_once($_SERVER["DOCUMENT_ROOT"]."/admin/pub/header.php");
include_once($_SERVER["DOCUMENT_ROOT"]."/public/function.php");
$config = include_once($_SERVER["DOCUMENT_ROOT"]."/public/config.php");

$arr = sele($config,'zuopin');


?>

    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="index.php">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">作品管理</span></div>
        </div>
        <!--<div class="search-wrap">
            <div class="search-content">
                <form action="/jscss/admin/design/index" method="post">
                    <table class="search-tab">
                        <tr>
                            <th width="120">选择分类:</th>
                            <td>
                                <select name="search-sort" id="">
                                    <option value="">全部</option>
                                    <option value="19">精品界面</option><option value="20">推荐界面</option>
                                </select>
                            </td>
                            <th width="70">关键字:</th>
                            <td><input class="common-text" placeholder="关键字" name="keywords" value="" id="" type="text"></td>
                            <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>-->
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="add.php"><i class="icon-font"></i>新增作品</a>
                        <a id="batchDel" href="javascript:void(0)"><i class="icon-font"></i>批量删除</a>
                        <a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th class="tc" width="5%"><input class="allChoose" name="" type="checkbox"></th>
                            <th>编号</th>
                            <th>关联文章</th>
                            <th>作者</th>
                            <th>标题</th>
                            <th>头像</th>
                            <th>状态</th>
                            <th>内容</th>
                            <th>发表时间</th>
                            <th>操作</th>
                        </tr>
                        
                     <?php
                        //mb_substr()设置字段
                        foreach ($arr as $k => $v) {
                            echo"<tr>
                            <td class='tc'><input name='id[]' value='59' type='checkbox'></td>
                            <td>{$v['id']}</td>
                            <td>{$v['wid']}</td>
                            <td>{$v['author']}</td>
                            <td><a target='_blank' href='#'>{$v['title']}</a></td>
                            <td>{$v['pic']}</td>
                            <td>{$v['status']}</td>
                            <td>".mb_substr($v['content'],0,20)."</td>
                            <td>".date('Y-m-s H:i:s',$v['ctime'])."</td>
                            <td>
                                <a class='link-update' href='upda.php?id={$v['id']}'>修改</a>
                                <a class='link-del' href='dele.php?id={$v['id']}'>删除</a>
                            </td>
                        </tr>";
                            }

                        ?>


                    </table>
                    <center>
        <a href="zuopin.php?p=1">首页</a>
        <a href="zuopin.php?p=<?php echo $_SESSION['shang'] ?>">上一页</a>
        <a href="zuopin.php?p=<?php echo $_SESSION['xia'] ?>">下一页</a>
        <a href="zuopin.php?p=<?php echo $_SESSION['fen'] ?>">尾页</a>
        总共<?php echo $_SESSION['fen']; ?>页  &nbsp;&nbsp;当前第<?php echo $_SESSION['p'];?>页</center>
                    
                </div>
            </form>
        </div>
    </div>
    <!--/main-->

<?php

include_once($_SERVER['DOCUMENT_ROOT'].'/admin/pub/footer.php');

?>